package com.evan.designpatterns.factory.homework3.abstractfactory;

import com.evan.designpatterns.factory.homework3.abstractfactory.factory.AbstractFactory;
import com.evan.designpatterns.factory.homework3.abstractfactory.factory.BicycleFactory;
import com.evan.designpatterns.factory.homework3.abstractfactory.factory.CarFactory;
import com.evan.designpatterns.factory.homework3.abstractfactory.product.Brand;
import com.evan.designpatterns.factory.homework3.abstractfactory.product.Wheel;

/**
 * @author :liujiapeng01
 * @date :2019-03-07 15:30
 **/
public class Test {

    public static void main(String[] args) {
        AbstractFactory factory = new BicycleFactory();
        Brand brand = factory.makeBrand();
        Wheel wheel = factory.makeWheel();
        System.out.println(brand.getClass().getName());
        System.out.println(wheel.getClass().getName());
        factory = new CarFactory();
        brand = factory.makeBrand();
        wheel = factory.makeWheel();
        System.out.println(brand.getClass().getName());
        System.out.println(wheel.getClass().getName());
    }
}
